<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</meta>
<title>F.cchar</title>
<link type="text/css" rel="stylesheet" href="../css/admin.css" />
<link type="text/css" rel="stylesheet" href="../css/item_show.css" />
<script type="text/javascript" src="../../1st.js"></script>
<script type="text/javascript" src="../../1st.highlight.js"></script>
</head>
<body id="split">
<div id="content">
	<div rel="F.param">
		<h2><span>返回值:</span>F.cchar</h2>
					<h3>概述 : 汉字组件</h3>
						
			<div class="desc">
				<div class="longdesc"><pre>包含汉字简繁转换、汉字转拼音、汉字笔画查询等
cchar=chinese characters</pre></div>
			</div>
							<h3>语法1：F.font()</h3>
						<table class="args">
				<!--caption>参数列表：(0)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td>String</td><td></td></tr>
			</table>
					<h3>语法2：F.gb2big(str)</h3>
							<div>描述：转到繁体</div>
						<table class="args">
				<!--caption>参数列表：(1)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>str</strong></td><td>String</td><td>简体字符</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td>String</td><td>返回繁体字</td></tr>
			</table>
					<h3>语法3：F.big2gb(str)</h3>
							<div>描述：转到简体</div>
						<table class="args">
				<!--caption>参数列表：(1)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>str</strong></td><td>String</td><td>繁体字符</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td>String</td><td>返回简体字</td></tr>
			</table>
					<h3>语法4：F.gb2letter(str)</h3>
							<div>描述：汉字转拼音</div>
						<table class="args">
				<!--caption>参数列表：(1)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>str</strong></td><td>String</td><td>汉字</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td></td><td></td></tr>
			</table>
					<h3>语法5：F.gb2num(str)</h3>
							<div>描述：获取汉字笔画数</div>
						<table class="args">
				<!--caption>参数列表：(1)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>str</strong></td><td>String</td><td>汉字</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td></td><td></td></tr>
			</table>
				<div class="example">
			<h3>示例 : </h3>
						
							<h5 xmlns="">HTML代码:</h5>
				<pre xmlns=""><code id="htmlbox"></code></pre>
									
				<h5 xmlns="">JS代码:</h5>
				<pre xmlns=""><code id="jsbox"></code></pre>
								</div>
		<div style="text-align:right">
			
					
				<button onclick="window.open('../codepages/81.html');">运行代码</button>
						
		</div><br/>	
		<div>
			<h3>同类参考 :</h3>
			<div>
							<span><a href='129.html'>F.accordion</a></span>&#12288;|&#12288;							<span><a href='76.html'>F.grid</a></span>&#12288;|&#12288;							<span><a href='5.html'>F.layout</a></span>&#12288;|&#12288;							<span><a href='77.html'>F.highlight</a></span>&#12288;|&#12288;							<span><a href='78.html'>F.calendar</a></span>&#12288;|&#12288;							<span><a href='31.html'>F.player</a></span>&#12288;|&#12288;							<span><a href='79.html'>F.lyric</a></span>&#12288;|&#12288;							<span><a href='63.html'>F.maths</a></span>&#12288;|&#12288;							<span><a href='178.html'>F.algorithms</a></span>						</div>
		</div>
	</div>
</div><br />

<textarea id="css" style="display:none;"></textarea>
<textarea id="html" style="display:none;"><textarea rows="15" cols="120" id="text">
中国皇后头发 先后恭喜发财
</textarea>
<br />
<button onclick="otext.value=F.gb2big(otext.value);">简体到繁体</button>
<button onclick="otext.value=F.big2gb(otext.value);">繁体到简体</button>

&#12288;<input type="text" /><input type="button" value="笔划查询" onclick="getbh(this.previousSibling.value)" />
&#12288;<input type="text" /><input type="button" value="拼音查询" onclick="getpy(this.previousSibling.value)" /></textarea>
<textarea id="js" style="display:none;">var otext = F('text').node;

F.js(F.path+"stroknum.js");
F.js(F.path+"pinyin.js");

function getbh(cstr){
	cstr.split('').each(function(s){
		alert('“'+s+'”的笔划数是:'+F.strokenum(s));
	})
}

function getpy(cstr){
	var a = cstr.split("").map(F.pinyin).join(" ");
	alert(a);
}</textarea>
<textarea id="result" style="display:none;"></textarea>


<script type="text/javascript">
var css = F('css').val();
var html = F('html').val();		
var js = F('js').val();
var result = F('result').val();
css && F('cssbox').highlight(css, "css");
html && F('htmlbox').highlight(html, "html");
js && F('jsbox').highlight(js, "js");
result && F('resultbox').highlight(result,"js");
</script>

</body>
</html>